﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BasketStats.Core.Team;

namespace BasketStats
{
    public partial class BenchPlayerThumbnailView : UserControl
    {
        private Player m_player;

        public Player Player
        {
            get
            {
                return m_player;
            }
            set
            {
                if (value != m_player)
                {
                    m_player = value;
                    Refresh();
                }
            }
        }
        
        public BenchPlayerThumbnailView()
        {
            InitializeComponent();
        }

        public override void Refresh()
        {
            lblNumber.Text = m_player.Info.Number.ToString(); 
            base.Refresh();
        }


        private void BenchPlayerThumbnailView_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                DoDragDrop(this, DragDropEffects.All);
            }
        }

        private void BenchPlayerThumbnailView_DragEnter(object sender, DragEventArgs e)
        {
            //DoDragDrop(this, DragDropEffects.All);
        }
    }
}
